function parsave(fname, Z, V, etimes, fvals, postdim, nnzz, alphav, sigmaz, sigmav, sigmax, poisstrunc, algtype, maxiter, burnin, dobuffer)
varname = {'Z', 'V', ...
    'etimes', 'fvals', 'postdim', 'nnzz', ...
    'alphav', 'sigmaz', 'sigmav', 'sigmax', ...
    'poisstrunc', 'algtype', 'maxiter', 'burnin' ...
};
if exist(fname, 'file')
    save(fname, varname{:}, '-append');
else
    save(fname, varname{:});
end

if dobuffer
    bfrd_vars_opt.Z = Z;
    bfrd_vars_opt.V = V;
    bfrd_iter = size(postdim, 2);
    save(fname, 'bfrd_vars_opt', 'bfrd_iter', '-append');
end

end